1. Field of the Invention
The present invention relates to an inspection apparatus and an inspection method and, in particular, to an inspection using template matching in an inspection apparatus such as a semiconductor inspection apparatus, for example.
2. Background Art
A technique for searching through an image for a given shape (template) has been widely used as template matching (see Section 8.3 of Digital Picture Processing by Azriel Rosenfeld and Avinash C. Kak).
Attempts to speed up template matching have been made such as a technique disclosed in JP Patent Publication (Kokai) No. 2003-85565 in which the degrees of similarity of x-projection and y-projection in a search image to a template are integrated to quickly obtain a matching position. Also, attempts to improve the accuracy of template matching have been made such as a technique disclosed in JP Patent Publication (Kokai) No. 61-98483 in which distribution of local similarities in a search image to a template is taken into consideration to accurately estimate the degree of similarity even in an image that contains much noise.
Template matching is also performed in measurement of a pattern on a semiconductor wafer using a scanning electron microscope to determine measurement positions. Rough alignment of measurement positions is performed by moving the stage on which the wafer is loaded. However, with the positioning precision of the stage, a significant misregistration occurs in an image taken with an electron microscope with a high magnification. To correct the misregistration to perform measurement at an accurate position, template matching is performed. In particular, a unique pattern approximate to the measurement position is registered as a template and the relative coordinates of the measurement position with respect to the template are stored. To obtain, the measurement position in an image taken, template matching is performed in the taken image to determine a matching position. The measurement position is at the relative coordinates from the matching position.
FIG. 1 illustrates template matching under a scanning electron microscope. First, the measurement position of an object (a) is photographed and a unique pattern in the position is registered as a template. The image (b) taken is referred to as a template selection image and the unique pattern (c) selected from the template selection image is referred to as a template. When an image of another object (a′) is taken (object (a′) may be another location that has the same pattern as (a) on the same wafer as (a), for example the same part of one of multiple identical dies formed on the same wafer, or may be a location having the same pattern on another wafer), the taken image is searched for a pattern that matches the template. The taken image (b′) is referred to as a search image. There is a misalignment between the template selection image (b) and the search image (b′) that is equal to the registration error of the stage. The misalignment is corrected by template matching. As a result of the template matching, portions with a high degree of similarity to the template are identified as candidate matching positions. The best position as the matching position is selected from among the candidate, matching positions as the ultimate matching position. For example, if the method described in JP Patent Publication (Kokai) No. 61-98483 is used, the template is subdivided into sections, the distribution of local similarities to the sections of the template is calculated for each candidate matching position and the ultimate matching position is determined by taking into consideration the distributions.
FIG. 2 shows a flow of template matching under a scanning electron microscope described above. A template selection image taken is input in a template registration unit for registering templates, a unique pattern selected manually or automatically is extracted in the template extracting unit and is stored. A search image taken is input in an image search unit which searches a matching position with the template, and is then compared with the template in a search image similarity calculating unit. The search image similarity calculating unit outputs search image similarity distribution information representing how the similarities to the template are distributed over the search image. A matching position determining unit determines a matching position based on the search image similarity distribution information.
Here, the point with the highest degree of similarity may simply be selected as the matching point or the method described in JP Patent Publication (Kokai) No. 61-98483 may be used. If the method is used, the search image similarity distribution information includes information about local similarities obtained using the subdivided template. If the distributions of similarities between the template and an x-projection and y-projection of the search image is held as search image similarity distribution information as described in JP Patent Publication (Kokai) No. 2003-85565, a matching position can be quickly determined.
As has been described above, the existing template matching methods attempt to accurately estimate the degrees of similarity in a search image to a template for example by taking into consideration the distribution of local similarities even if the image contains much noise.